# -*- mode: python -*-
# -*- coding: utf-8 -*-
# spec file for pyinstaller. Read README.pyinstaller for more info 

import os
import sys

#ROOT = os.path.dirname(sys.argv[1]) + '/'
ROOT = 'c:/dimcalc/'
print 'ROOT = ',ROOT

#папки которые нужно подключить
images = Tree(ROOT + 'images', prefix='images', excludes='*.py')
gui = Tree(ROOT + 'gui', prefix='gui')
data = Tree(ROOT+ 'data', prefix='data')
example = Tree(ROOT+ 'example', prefix='example')

#data = Tree(ROOT + 'data')
#locale = Tree(ROOT + 'sqlkit/locale', prefix='sqlkit/locale')
#demo = Tree(ROOT + 'demo', prefix='demo',
            #excludes= ROOT + 'demo/layout')

a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'), 
             os.path.join(HOMEPATH,'support/useUnicode.py'), 
             'dimcalc.py'],
             pathex=[os.path.abspath(os.path.dirname(sys.argv[0]))])
         
             
            
pyz = PYZ(a.pure)


exe = EXE(pyz,
          a.scripts,
          exclude_binaries=1,
          #
          name=os.path.join('build/pyi.win32/dimcalc', 'dimcalc.exe'),
          debug=False,
          strip=True,
          upx=True,
          console=False, 
          icon=ROOT +'images/dimcalc.ico')

          
coll = COLLECT( exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               images,
               gui,
               data,
               example,
               strip=False,
               upx=True,
               name=os.path.join('dist', 'dimcalc')
               )
